package com.k12.user.controller;

import com.k12.user.model.entity.SysMenu;
import com.k12.user.model.entity.SysUser;
import com.k12.user.service.SysOperatorService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping
public class SysOperatorController {

    @Resource
    private SysOperatorService sysOperatorService;

    @GetMapping("listMenuInfo")
    public List<SysMenu> listMenuInfo(@RequestParam("tenantId") String tenantId,@RequestParam("userId") String userId){
        return sysOperatorService.listMenuInfo(tenantId,userId);
    }


    @GetMapping("selectUserDept")
    public List<SysUser> selectUserDept(@RequestParam("tenantId") String tenantId,@RequestParam("userId") String userId){
        return sysOperatorService.selectUserDept(tenantId,userId);
    }
}
